package com.at.dao;

import com.at.domain.Tag;
import com.at.domain.Type;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author : code1997
 * @date :2020-10-2020/10/8 19:19
 */
@Repository
public interface TagDao extends JpaRepository<Tag,Long> {

    Tag getTagByName(String name);

    @Query("select t from Tag t")
    List<Tag> getTop(Pageable pageable);
}
